<template>
  <div class="box">
    <div class="db">
      <div>
        <span @click="fh" style="cursor: pointer">← 返回</span>
        <span style="margin-left: 8px; margin-right: 8px">|</span>
        <span>查看企业</span>
      </div>
      <span>黑马管理员</span>
    </div>
    <div class="nr">
      <div style="padding-top: 15px; padding-left: 10px">企业信息</div>
      <div class="nr1">
        <a-form
          :model="formState"
          name="basic"
          :label-col="{ span: 5 }"
          :wrapper-col="{ span: 24 }"
          autocomplete="off"
          @finish="onFinish"
          @finishFailed="onFinishFailed"
        >
          <a-row>
            <a-col :span="12">
              <a-form-item label="企业名称">
               {{ list.name }}</a-form-item
            ></a-col>
            <a-col :span="12">
              <a-form-item label="法人">
               {{ list.legalPerson }}</a-form-item
            ></a-col>
          </a-row>

          <a-row>
            <a-col :span="12"
              ><a-form-item label="注册地址">
              {{ list.registeredAddress }}</a-form-item
            ></a-col>
            <a-col :span="12">
              <a-form-item label="所在行业">
               {{ list.industryName }}</a-form-item
            ></a-col>
          </a-row>
          <a-row>
            <a-col :span="12">
              <a-form-item label="营业执照">
               <img :src="list.businessLicenseUrl" style="width: 100px;
               height: 100px;">
              </a-form-item>
            </a-col>
          </a-row>
        </a-form>
      </div>
    </div>
    <div class="wb">
      <div style="padding-top: 15px; padding-left: 10px">联系人信息</div>
      <div class="wbxx">
        <a-form
          :model="formState"
          name="basic"
          :label-col="{ span: 5 }"
          :wrapper-col="{ span: 24 }"
          autocomplete="off"
          @finish="onFinish"
          @finishFailed="onFinishFailed"
        >
          <a-row>
            <a-col :span="12">
              <a-form-item label="企业联系人">
                {{ list.contact }}</a-form-item
            ></a-col>
            <a-col :span="12">
              <a-form-item label="联系电话">
               {{ list.contactNumber }}</a-form-item
            ></a-col>
          </a-row>
        </a-form>
      </div>
    </div>
    <div class="ddd">
      <div style="padding-top: 15px; padding-left: 10px">租赁记录</div>
      <div class="bd">
        <a-table :columns="columns" :data-source="aaa" size="small" style="height: 50px" :pagination="false"/>
      </div>
    </div>
  </div>
</template>
<script setup>
import router from '../../../router'
import { getId } from '@/utils/auth'
import { ref } from 'vue'
const columns = [
  { title: '序号', detaIndex: 'number' },
  { title: '租赁楼宇', detaIndex: 'name', key: 'name' },
  { title: '合同状态', detaIndex: 'contact', key: 'contact' },
  { title: '租赁起止时间', detaIndex: 'contactNumber', key: 'contactNumber' },
  { title: '租赁合同', detaIndex: 'operate', key: 'operate' },
  { title: '录入时间', detaIndex: 'createTime', key: 'createTime' },
  { title: '操作', detaIndex: 'caozuo', key: 'caozuo' }
]
// 点击返回企业管理
const fh = () => {
  router.back()
}
// let list =ref([])
// let rent = ref([])

// list.value = getId()
// rent.value = list.value.rent
let aaa = ref([])
const list = getId()
console.log(list);
const rent = list.rent
console.log(rent)
aaa.value=rent
console.log(aaa.value);
</script>
<style scoped lang="scss">
.box {
  position: relative;
  width: 100%;
  height: 900px;
  background-color: #f4f6f8;
  .db {
    display: flex;
    justify-content: space-between;
    width: 100%;
    height: 64px;
    background-color: #fff;
    font-size: 16px;
    line-height: 64px;
    padding-left: 20px;
    padding-right: 20px;
  }
  .wb {
    width: 1447px;
    height: 140px;
    background-color: #fff;
    margin: auto;
    margin-top: 20px;
    .wbxx {
      width: 1317px;
      height: 56px;
      background-color: #fff;
      margin: auto;
      margin-top: 20px;
    }
  }
  .nr {
    width: 1447px;
    height: 284px;
    background-color: #fff;
    margin: auto;
    margin-top: 20px;
    .nr1 {
      width: 1340px;
      height: 200px;
      background-color: #fff;
      margin: auto;
      margin-top: 20px;
    }
  }
  .ddd {
    width: 1447px;
    height: 300px;
    background-color: #fff;
    margin: auto;
    margin-top: 20px;
    .bd {
      width: 1317px;
      height: 78px;
      background-color: #fff;
      margin-top: 20px;
      margin-left: 65px;
    }
  }
}
</style>
